package SV_PATH_INJ;
import javax.servlet.http.*;
public class Vulnerable_01 {
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String name = req.getParameter("userName");
        File userDir = new File("userFiles", name);
        File profile = new File(userDir, "profile");
        FileOutputStream stream = new FileOutputStream(profile);
        try {
            createFileWithSensitiveInformation(stream);
        } finally {
            stream.close();
        }
    }
}
